<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/19 0019
 * Time: 下午 1:46
 */
namespace app\admin\controller;
use app\member\controller\Member;
use think\Controller;
use think\Session;

class Login extends Controller {
    #用户登录
    public function login(){
        return $this->fetch('./public/user/login.html');
    }
    #管理员登录
    public function admin_login(){
        return $this->fetch('./public/admin/login.html');
    }
    #管理员退出
    public function admin_logout(){
        // 删除（当前作用域）
        Session::delete('admin_info');
        // 删除think作用域下面的值
        Session::delete('admin_info','think');
        return $this->fetch('./public/admin/login.html');
    }

    #用户注册
    public function register(){
        return $this->fetch('./public/user/register.html');
    }
    #用户退出
    public function logout(){
        // 删除（当前作用域）
        Session::delete('admin_info');
        // 删除think作用域下面的值
        Session::delete('admin_info','think');
        return $this->fetch('./public/user/login.html');
    }

}